<%-- 
    Document   : home
    Created on : 28/07/2011, 11:40:58 AM
    Author     : Lewis Kelly 42007689
--%>

<%--Includes--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ include file="../header.jsp" %>
<link rel="stylesheet" type="text/css" href="../style.css"/>
<div id="content-container">
    <div id="content">
        <!-- Content goes here -->
        
        <style type="text/css">
            .hTab {
                font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
                width:80%;
                border:1px solid #009933;
                text-align:center;
            }
            .hTab td, .hTab th .hTab tr {
                font-size:1em;    
                border:1px solid #009933;
                padding:3px 7px 2px 17px;
            }
            .hTab th {
                font-size:1.1em;
                text-align:center;
                padding-top:5px;
                padding-bottom:4px;
                background-color:#008833;
                color:#ffffff;
            }
            
            #htab{
                margin-right:-180px;
                position:relative;
                left:8px;
            }



        </style>

        <div id="data">
            
            <%--Form for Polls--%>
            <form:form method="post" commandName="home" name="home" id="home">
                <h3>List Of Polls</h3>
                <div id="htab">
                    <table class="hTab">
                        <tr id="ttr"><th>Poll ID</th><th>Poll Name</th><th>Creation Date</th><th>Question List</th><th>Assign To PM</th><th>Location</th></tr>
                        <c:forEach items="${polls}" var="poll">     
                            <tr>
                                <td>${poll.getId()}</td>
                                <td>${poll.getName()}</td>
                                <td>${poll.getCreationDate()}</td>
                                
                                <%--Links to other pages given the poll ID's--%>
                                <td><a href="viewQuestions.html?pid=<c:out value="${poll.getId()}"/>">View</a></td>
                                <td><a href="assignToPM.html?pid=<c:out value="${poll.getId()}"/>">Assign</a></td>
                                <td><a href="location.html?pid=<c:out value="${poll.getId()}"/>">Add</a></td>

                            </tr>
                        </c:forEach>
                    </table>
                </div>
            </form:form>
        </div>
            

</div>		

            <%--Include Footer--%>
<%@ include file="../footer.jsp" %>
